package com.example.sell.dto;

import com.example.sell.dataobject.OrderDetail;
import com.example.sell.utils.serializer.DateToLongSerializer;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author: vince_zww
 * @date: 2020/8/14 19:46
 * @desceription: 购买订单
 */
@Data
//@JsonSerialize(include = Jso)
//@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderDTO {
    /**
     * 订单id
     */
    private String orderId;

    /**
     * 买家名字
     */
    private String buyerName;

    /**
     * 买家手机号
     */
    private String buyerPhone;

    /**
     * 买家地址
     */
    private String buyerAddress;

    /**
     * 买家微信Openid
     */
    private String buyerOpenid;

    /**
     * 订单金额
     */
    private BigDecimal orderAmount;

    /**
     * 订单状态，默认为新下订单
     */
    private Integer orderStatus;

    /**
     * 支付状态，默认未支付
     */
    private Integer payStatus;

    /**
     * 创建时间
     */
//    @JsonSerialize(using = DateToLongSerializer.class)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
//    @JsonSerialize(using = DateToLongSerializer.class)
    private Date updateTime;

    /**
     * 0：未删除，1：已删除
     */
//    private Integer deleteFlag = DeleteFlagEnum.FALSE.getCode();

    private List<OrderDetail> orderDetailsList = new ArrayList<>();
}
